﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace BingZi.HY.Core.Entities.Center
{
	/// <summary>
	/// 蜘蛛记录
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("蜘蛛记录")]
	[BindTable("app_BotSpider", Description = "蜘蛛记录", ConnName = "Center", DbType = DatabaseType.SqlServer)]
	public partial class app_BotSpider
	{
		#region 属性
		private Int32 _ValueID;
		/// <summary>
		/// 序号
		/// </summary>
		[Description("序号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ValueID", "序号", "", "int", 10, 0, false)]
		public Int32 ValueID
		{
			get { return _ValueID; }
			set { if (OnPropertyChange("ValueID", value)) _ValueID = value; }
		}

		private String _BotIp;
		/// <summary>
		/// 蜘蛛IP
		/// </summary>
		[Description("蜘蛛IP")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(2, "BotIp", "蜘蛛IP", "", "varchar(20)", 0, 0, false)]
		public String BotIp
		{
			get { return _BotIp; }
			set { if (OnPropertyChange("BotIp", value)) _BotIp = value; }
		}

		private String _BotName;
		/// <summary>
		/// 蜘蛛
		/// </summary>
		[Description("蜘蛛")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(3, "BotName", "蜘蛛", "", "varchar(50)", 0, 0, false)]
		public String BotName
		{
			get { return _BotName; }
			set { if (OnPropertyChange("BotName", value)) _BotName = value; }
		}

		private String _BotUrl;
		/// <summary>
		/// 访问地址
		/// </summary>
		[Description("访问地址")]
		[DataObjectField(false, false, false, 300)]
		[BindColumn(4, "BotUrl", "访问地址", "", "varchar(300)", 0, 0, false)]
		public String BotUrl
		{
			get { return _BotUrl; }
			set { if (OnPropertyChange("BotUrl", value)) _BotUrl = value; }
		}

		private DateTime _StartTime;
		/// <summary>
		/// 时间
		/// </summary>
		[Description("时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(5, "StartTime", "时间", "", "datetime", 3, 0, false)]
		public DateTime StartTime
		{
			get { return _StartTime; }
			set { if (OnPropertyChange("StartTime", value)) _StartTime = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ValueID" : return _ValueID;
					case "BotIp" : return _BotIp;
					case "BotName" : return _BotName;
					case "BotUrl" : return _BotUrl;
					case "StartTime" : return _StartTime;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ValueID" : _ValueID = Convert.ToInt32(value); break;
					case "BotIp" : _BotIp = Convert.ToString(value); break;
					case "BotName" : _BotName = Convert.ToString(value); break;
					case "BotUrl" : _BotUrl = Convert.ToString(value); break;
					case "StartTime" : _StartTime = Convert.ToDateTime(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得蜘蛛记录字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 序号
			///</summary>
			public const String ValueID = "ValueID";

			///<summary>
			/// 蜘蛛IP
			///</summary>
			public const String BotIp = "BotIp";

			///<summary>
			/// 蜘蛛
			///</summary>
			public const String BotName = "BotName";

			///<summary>
			/// 访问地址
			///</summary>
			public const String BotUrl = "BotUrl";

			///<summary>
			/// 时间
			///</summary>
			public const String StartTime = "StartTime";
		}
		#endregion
	}
}